<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="{ADMIN_THEME}images/reset.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/system.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/dialog.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/switchbox.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/table_form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{ADMIN_THEME}js/jquery.min.js"></script>
<script type="text/javascript" src="{ADMIN_THEME}js/dialog.js"></script>
<script type="text/javascript">var sitepath = "{SITE_PATH}{ENTRY_SCRIPT_NAME}";</script>
<script type="text/javascript" src="{LANG_PATH}lang.js"></script>
<script type="text/javascript" src="{ADMIN_THEME}js/core.js"></script>
<title>admin</title>
</head>
<body style="font-weight: normal;">
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
		<a href="{url('admin/block')}"><em>{lang('a-men-30')}</em></a><span>|</span>
		<a href="{url('admin/block/add')}" class="on"><em>{lang('a-add')}</em></a><span>|</span>
		<a href="{url('admin/block/cache')}"><em>{lang('a-cache')}</em></a>
	</div>
	<div class="bk10"></div>
	<div class="table-list">
		<form action="" method="post">
		<input name="id" type="hidden" value="{$data['id']}">
		<table width="100%" class="table_form">
		<tr>
			<th width="200">{lang('a-blo-7')}： </th>
			<td><input class="input-text" type="text" name="data[name]" value="{$data['name']}" size="30" required /></td>
		</tr>
		<tr>
			<th>{lang('a-blo-8')}： </th>
			<td>
			<select id="type" name="data[type]" onChange="select_type(this.value)" required />
			<option value="0"> ... {lang('a-select')}</option>
			{loop $type $i=>$v}
			<option value="{$i}" {if $data['type']==$i}selected{/if}>{$v}</option>
			{/loop}
			</select></td>
		</tr>
		<tr id="text_2" style="display:none">
			<th>{lang('a-blo-9')}： </th>
			<td><input type="text" class="input-text" size="50" value="{$data[content]}" name="data[content_2]" id="thumb" />
				<input type="button" style="width:66px;cursor:pointer;" class="button" onClick="preview('thumb')" value="{lang('a-mod-118')}">
				<input type="button" style="width:66px;cursor:pointer;" class="button" onClick="uploadImage('thumb')" value="{lang('a-mod-119')}">
				<div id="urlTip" class="onShow">{lang('a-pic')}</div></td>
		</tr>
		<tr id="text_1" style="display:none">
			<th>{lang('a-blo-9')}： </th>
			<td><textarea name="data[content_1]" id="data[content]" cols="91" rows="8" />{$data['content']}</textarea>
			<br><div class="onShow">{lang('a-blo-10')}</div></td>
		</tr>
		<tr id="text_3" style="display:none;">
			<th>{lang('a-blo-9')}：</th>
			<td>
			{php App::auto_load('fields');echo content_editor('content_3', array(0=>$data['content']), array('system'=>1));}
			<br><div class="onShow">{lang('a-blo-11')}</div></td>
		</tr>
		<tr>
			<th>&nbsp;</th>
			<td><input class="button" type="submit" name="submit" value="{lang('a-submit')}" /></td>
		</tr>
		</table>
		</form>
	</div>
</div>
<script type="text/javascript">
function select_type(id) {
	$("#text_1").hide();
	$("#text_2").hide();
	$("#text_3").hide();
	$("#text_"+id).show();
}
{if $data['type']}
$("#text_{$data['type']}").show();
{/if}
</script>
</body>
</html>